//
//  ZWAudioTwiceTableCell.m
//  WanEr
//
//  Created by 高文萍 on 16/1/15.
//  Copyright © 2016年 ziwokeji. All rights reserved.
//

#import "ZWAudioTwiceTableCell.h"

@implementation ZWAudioTwiceTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.cityLabel = [[UILabel alloc]init];
        self.cityLabel.font = [UIFont systemFontOfSize:16];
        self.cityLabel.textAlignment = NSTextAlignmentLeft;
        [self.contentView addSubview:self.cityLabel];
        self.numLabel = [[UILabel alloc]init];
        self.numLabel.font = [UIFont systemFontOfSize:16];
        [self.contentView addSubview:self.numLabel];
        self.img = [[UIImageView alloc]init];
        [self.contentView addSubview:self.img];
        
        self.lineLabel = [[UILabel alloc]init];
        self.lineLabel.textColor = [UIColor colorWithWhite:0.637 alpha:1.000];
        [self.contentView addSubview:self.lineLabel];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [self.numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.cityLabel.mas_left).offset(0);
        make.left.equalTo(@(0));
        make.centerY.equalTo(self);
    }];
    [self.cityLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(28));
        make.right.equalTo(self.img.mas_left).offset(-10);
        make.centerY.equalTo(self);
    }];
    [self.lineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.bottom.equalTo (@(0));
        make.right.equalTo(@(20));
        make.top.equalTo(self.cityLabel.mas_bottom).offset(1.5);
        make.height.equalTo(@(1.5));
        
    }];
    [self.img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(@(-20));
        make.centerY.equalTo(self);
        make.width.equalTo(@(3.5));
        make.height.equalTo(@(11));
    }];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
